package com.hxx.common;

import com.hxx.domain.TPerson;
import com.hxx.domain.TUser;
import lombok.SneakyThrows;
import lombok.Synchronized;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

import java.io.FileInputStream;
import java.io.InputStream;
import java.util.logging.Logger;

@Slf4j
public class TestDemo {

    @SneakyThrows
    public void show(){
        InputStream in = new FileInputStream("");
    }
    public static void main(String[] args) {
        TUser tUser = new TUser();
        // 链式编程
       /* tUser.setId(1)
                .setUsername("zhangsan")
                .setSex("男")
                .setAge(18);
        log.info(tUser.toString());
        //构建
        TUser user1 = TUser.builder()
                .id(1)
                .username("zhangsan")
                .sex("男")
                .age(18)
                .build();
        log.info(user1.toString());*/
    }
    @Test
    public void test1() {
        TPerson leo = new TPerson(1, null);
        System.out.println(leo.id());
        System.out.println(leo.name());
    }
}
